#pragma once
#include <fstream>
#include "DictionaryNode.h"
//#include "stdafx.h"

class DictionaryTree
{
public:
	long numletters;
	long letcount[26];
	double letprob[26];
	DictionaryNode * Start() {
		return &head;
	};
	DictionaryNode * GiveLetter(DictionaryNode * parse, char letter);

	DictionaryTree(const char * dictionaryfile);
	~DictionaryTree(void);

private:
	DictionaryNode head;
	void AddWord(char * word);
};

extern DictionaryTree * Dictionary;
